package com.xquant.pricing.pricingConfig.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author ershuai.zhao
 */
@Repository
public interface PricingConfigAuthorMapper {
    /**
     * queryTargetParam
     *
     * @param map
     * @return
     */
    List<Map> queryPricingConfigAuthorByPage(Map map);


    List<Map> queryPricingConfigAuthor(Map map);

    /**
     * 查询用户列表
     *
     * @param map
     * @return
     */
    List<Map> queryPricingUserAuthorByPage(Map map);

    /**
     * savePricingConfig
     *
     * @param map
     */
    void savePricingConfig(Map map);

    /**
     * updatePricingConfig
     *
     * @param map
     */
    void updatePricingConfig(Map map);

    /**
     * deletePricingConfig
     *
     * @param map
     */
    void deletePricingConfig(Map map);

    void deletePricOptionContract(Map map);

    void deletePricOptionUnderlying(Map map);

    void deletePricOptionUnderlyingCorr(Map map);

    void deleteSysUserPricCfg(Map map);

    /**
     * 定价配置用户权限
     *
     * @param map
     * @return
     */
    List<Map> queryPricingConfigUserAuthor(Map map);

    /**
     * 查询用户默认配置
     *
     * @param map
     * @return
     */
    List<Map> queryPricingConfigUserDefaultAuthor(Map map);

    List<Map> queryGroupPricingConfigAuthorByPage(Map map);

    /**
     * savePricingConfig
     *
     * @param map
     */
    void savePricingConfigUserAuthor(Map map);

    void insertSyncPricOptionContract(Map map);

    void insertSyncOptionUnderlying(Map map);

    /**
     * updatePricingConfig
     *
     * @param map
     */
    void updatePricingConfigUserAuthor(Map map);

    /**
     * deletePricingConfig
     *
     * @param map
     */
    void deletePricingConfigUserAuthor(Map map);

    void deleteUserDefaultPricingParam(Map<String, Object> params);

    void saveUserDefaultPricingParam(Map<String, Object> params);


    int updateUserPermCfg(Map<String,Object> params);

    int updateDeptPermCfg(Map<String,Object> params);

    int removeUserPermCfg(Map<String,Object> params);

    int removeDeptPermCfg(Map<String,Object> params);

    List<String> getUserPermUserId(Map<String,Object> params);

    List<String> getDeptPermDeptId(Map<String,Object> params);

    int batchInsertCfgUser(@Param("list") List<Map<String,Object>> list);

    int batchInsertCfgDept(Map map);

    void removeUserPermCfgByUserId(Map param);

    void removeDeptPermCfgByDeptId(Map param);

    void removeUserCfgByCfgId(Map param);

    void removeDeptCfgByCfgId(Map param);

    String queryCfgFlagByUserId(String userId);


    List<Map> queryCfgDept(Map map);

    void saveCfgDept(Map map);

    void updateCfgDept(Map map);

    void deleteCfgDept(Map map);

    Map checkCfgName(Map map);

    void updateDefaultOtherAccRight(Map map);

    void updateDeptPremcfgRight(Map map);

    List<String> selectDefaultDeptPricCfg(Map map);

    List<Map> selectDeptCfgRight(Map map);

    List<Map> selectDefaultOtherPerm(Map map);

    void insertAllDeptRight(Map map);

    void updateDefaultOtherDeptRight(Map map);

    void updateUserPermCfgId(Map map);

    void insertUserPermCfgId(Map map);

    void insertAllUserIrRight(String ircCode);

    void insertAllDeptIrRight(String ircCode);

   void updateAllUserIrRight(@Param("list") List<String> list);


    void insertAllUserDivRight(String divCode);

    void insertAllDeptDivRight(String divCode);

    void updateAllUserDivRight(@Param("list") List<String> list);

    void insertAllUserVlsRight(String vlsCode);

    void insertAllDeptVlsRight(String vlsCode);

    void updateAllUserVlsRight(@Param("list") List<String> list);


    void updateUserPerm(Map map);

    void updateDeptPerm(Map map);


}
